package roy.abc.study.WebServices.JavaWSUpAndRunning.ch01.team;

import javax.xml.ws.Endpoint;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class TeamPublisher {
	private static Logger logger = LoggerFactory.getLogger(TeamPublisher.class);

	/**
	 * @param args
	 * @throws InterruptedException 
	 */
	public static void main(String[] args) throws InterruptedException {
		int port = 8888;
		String url = "http://localhost:" + port + "/teams";
		logger.debug("Publishing teams on port " + port);
		Endpoint.publish(url, new Teams());
		
		Thread.sleep(1 * 60 * 1000);
		logger.debug("Service exited.");
		System.exit(0);
	}

}
